<template>
  <the-list uri="/my/sells?state=pass" ref="list1">
    <template v-slot:default="{ all }">
      <div class="p-4 flex items-center" v-for="item in all" :key="item.id">
        <div class="ml-4 flex-1">
          <p>
            <small class="text-sm text-gray-500">FCB</small>
            <van-icon
              class="mx-1 text-yellow-500 iconfont icon-bit-coin-line"
            ></van-icon>
            <big class="text-red-500">{{ item.coins }}</big>
          </p>
          <p>
            <!-- <small class="text-sm text-gray-500">CNY</small> -->
            <!-- <van-icon
              class="mx-1 text-yellow-500 iconfont icon-YUAN"
            ></van-icon>
            <big class="text-green-500">{{ item.money }}</big> -->
          </p>

          <p class="mt-1 text-xs text-gray-500">
            <span> 发布于: {{ item.created_at }} </span>
          </p>
        </div>
      </div>
    </template>
  </the-list>
</template>

<script>
import countDown from '../../components/coutDown.vue'
import theList from '../../components/list.vue'

import dayjs from 'dayjs'
import 'dayjs/locale/zh-cn'
dayjs.locale('zh-cn')

export default {
  components: {
    theList,
    countDown,
  },
  methods: {
    countDownHalfHour(val) {
      const endTime = dayjs(val).add(3, 'hour')
      return endTime.diff(dayjs())
    },
    onCountDonwFinish() {
      this.$refs.tab1.onRefresh()
      this.$emit('count-down-finish')
    },
  },
}
</script>

<style>
</style>